package com.hopu.v1.pojo.verify;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 学生请假申请表
 * @TableName t_student_leave_applications
 */
@TableName(value ="t_student_leave_applications")
@Data
public class StudentLeaveApplications implements Serializable {
    /**
     * 主键ID，唯一标识
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 学生ID，关联学生信息表
     */
    private Integer studentId;


    /**
     * 请假开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;

    /**
     * 请假结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    /**
     * 请假类型：1病假,2事假,3婚假,4其他
     */
    private Integer leaveType;

    /**
     * 请假原因
     */
    private String reason;

    /**
     * 请假状态：0未审批，1审批通过，2审批驳回
     */
    private Integer status;


    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    
    @TableField(exist = false)
    private Integer staffId;
    
    @TableField(exist = false)
    private Integer teacherId;

    @TableField(exist = false)
    private String studentName;

   @TableField(exist = false)
    private String approvalStatus;
}